<?php

/**
 * @author PeoneEr
 * @method sql()
 */
require_once "core/db.php";

class Msetparams1 extends DB {

    private $_query;

    protected function setNewParams($email, $question, $answer) {
        /**
         *  Устанавлиаем новые значения в БД
         * @param mixed $email
         * @param mixed $question
         * @param mixed $answer
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "UPDATE `account_data` SET `email` = '$email', `question` = '$question', `answer` = '$answer' WHERE `name` = '$_SESSION[name]'";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
